//记忆化搜索 斐波那契数列
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e3;
ll dp[N];
ll solve(ll ret)
{
	if(ret==0)
		return 0;
	if(ret==1)
		return 1;
	
	if(dp[ret] != -1)
		return dp[ret];
	
	return dp[ret] = solve(ret-1) + solve(ret-2);
}
int main()
{
	int T=0;
	cin >> T;
	while(T--)
	{
		fill(dp,dp+sizeof(dp),-1);
		int n = 0;
		cin >> n;
		ll ret = solve(n);
		cout << ret <<'\n';
	}
	return 0;
}
